Skip to content

feat(planning): plans as first-class, replayable artifacts (#623) - #639

Open
cagdasyurekli wants to merge 1 commit into
andrewyng:mainfrom
cagdasyurekli:feat/issue-623-replayable-plan-artifacts
Open

feat(planning): plans as first-class, replayable artifacts (#623)#639
cagdasyurekli wants to merge 1 commit into
andrewyng:mainfrom
cagdasyurekli:feat/issue-623-replayable-plan-artifacts

Conversation

@cagdasyurekli

Copy link
Copy Markdown

Closes #623

Summary

This PR implements first-class, replayable plan artifacts as requested in #623:

  1. Durable Plan Persistence: Approved plan proposals are durably stored on the SQLite table ( column) and mirrored to and in the session scratch directory.
  2. Audit Attribution: Plan proposals tag the active engine context with , recording events upon approval and tracking across subsequent tool execution steps and deliverables.
  3. Plan Replay API:
    • GET /v1/sessions/{session_id}/plan: Retrieve the session's active plan artifact.
    • POST /v1/sessions/{session_id}/plan/replay: Replay the approved plan in a fresh session with seeded prompt, scratch plan mirroring, and audit linkage (stage="plan_replayed").
    • GET /v1/plans: List all saved plan artifacts across sessions.
    • POST /v1/plans/replay: Replay any saved plan artifact by plan ID.
  4. GUI Integration:
    • Added "Re-run this plan" action button and menu option to ArtifactViewer in RightRail.tsx when viewing plan.md or files in plans/.
    • Internationalized with English (en.json) and Chinese (zh.json) strings.
  5. Testing:
    • Added tests/test_plan_replay.py covering plan persistence in ConversationStore, audit store filtering by plan_id, engine audit attribution upon approval, manager replay functionality, and REST endpoints. All tests pass.

…#623)

- Persist approved plan proposals durably on SessionRecord and scratch plan files (plan.md and plans/<plan_id>.md)
- Store plan_id across audit events and tag execution steps executed under an approved plan
- Add REST endpoints GET /v1/sessions/{session_id}/plan, POST /v1/sessions/{session_id}/plan/replay, GET /v1/plans, and POST /v1/plans/replay
- Add 'Re-run this plan' action button and menu item in the GUI ArtifactViewer
- Add comprehensive automated test coverage for plan persistence, audit tagging, replay, and REST API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Plans as first-class, replayable artifacts

1 participant